From 3e3d29f7b73381dd328e5213e0dca04d3e4f8048 Mon Sep 17 00:00:00 2001 From: Olivier Fourdan Date: Wed, 16 Mar 2016 14:19:14 +0100 Subject: [PATCH] gtkwindow: ignore default size if there is a size request Some applications set both a default size on their gtk window and a size request on the corresponding gtk widget. Until now, the default size was ignored for fixed size windows, so this had no effect and remained unnoticed, but with the recent change for client-side decorations, the default size is now used even for fixed size windows, which can cause the resulting fixed size window to be much smaller than expected with the size request. For fixed size windows, if we have both a size request and a default size set, prefer the size request as before. https://bugzilla.gnome.org/show_bug.cgi?id=763749 --- gtk/gtkwindow.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 6b21e0bf23..789bb1ef1b 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -9787,9 +9787,11 @@ gtk_window_update_fixed_size (GtkWindow *window, { GtkWindowPrivate *priv = window->priv; GtkWindowGeometryInfo *info; + gboolean has_size_request; /* Adjust the geometry hints for non-resizable windows only */ - if (priv->resizable) + has_size_request = gtk_widget_has_size_request (GTK_WIDGET (window)); + if (priv->resizable || has_size_request) return; info = gtk_window_get_geometry_info (window, FALSE); -- 2.30.2